package main

import (
	"flag"
	"gitee.com/yysf_xin/dplog/pkg/ck"
	"gitee.com/yysf_xin/dplog/pkg/extracter/java"
	"gitee.com/yysf_xin/dplog/pkg/slog"
)

type Option struct {
	File   string
	Config string
	Java   java.Opt
	Option slog.Option
	Op     ck.Option
}

var (
	opt = Option{}
)

func main() {

}
func main1() {
	flag.StringVar(&opt.File, "f", "", "use slog file")
	flag.StringVar(&opt.Config, "c", "", "use config file")
	java.InitFlag(&opt.Java)
	slog.InitFlag(&opt.Option)

	flag.Parse()

	opt.Op.Db = "clickhouse://default:12345@127.0.0.1:9000/fx"
	opt.Op.Batch = 1000
	opt.Op.Table = "app_log_all2"

	em1, err := ck.NewCollect(&opt.Op)
	if err != nil {
		panic(err)
	}
	_ = em1

}
